<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Process V2</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../process.html" title="Chapter 28. Boost.Process">
<link rel="prev" href="acknowledgements.html" title="Acknowledgements">
<link rel="next" href="../boost/process/v2/bound_launcher.html" title="Struct template bound_launcher">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../process.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/process/v2/bound_launcher.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_process.v2"></a><a class="link" href="v2.html" title="Process V2">Process V2</a>
</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction">Introduction</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.quickstart">Quickstart</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.launchers">Launcher</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.start_dir">process_start_dir</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio">stdio</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.env">Environment</a></span></dt>
<dt><span class="section"><a href="v2.html#process.reference">Reference</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.introduction"></a><a class="link" href="v2.html#boost_process.v2.introduction" title="Introduction">Introduction</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.simplified">Simplified
        Interface</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.pidfd_open">pidfd_open</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.asio">Full asio integration</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.unreliable">Unreliable
        functionality</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.utf8">UTF-8</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.src">Separate compilation</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.introduction.limit_fd">Fd safe by
        default</a></span></dt>
</dl></div>
<p>
        Boost.process V2 is an redesign of boost.process, based on previous design
        mistakes &amp; improved system APIs.
      </p>
<p>
        The major changes are
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
            Simplified interface
          </li>
<li class="listitem">
            Reliance on pidfd_open on linux
          </li>
<li class="listitem">
            Full asio integration
          </li>
<li class="listitem">
            Removed unreliable functionality
          </li>
<li class="listitem">
            UTF8 Support
          </li>
<li class="listitem">
            separate compilation
          </li>
<li class="listitem">
            fd safe by default
          </li>
</ul></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.simplified"></a><a class="link" href="v2.html#boost_process.v2.introduction.simplified" title="Simplified Interface">Simplified
        Interface</a>
</h4></div></div></div>
<p>
          In process v1 one can define partial settings in the constructor of the
          process, which has lead to a small DSL.
        </p>
<pre class="programlisting"><span class="identifier">child</span> <span class="identifier">c</span><span class="special">{</span><span class="identifier">exe</span><span class="special">=</span><span class="string">"test"</span><span class="special">,</span> <span class="identifier">args</span><span class="special">+=</span><span class="string">"--help"</span><span class="special">,</span> <span class="identifier">std_in</span> <span class="special">&lt;</span> <span class="identifier">null</span><span class="special">(),</span> <span class="identifier">env</span><span class="special">[</span><span class="string">"FOO"</span><span class="special">]</span> <span class="special">+=</span> <span class="string">"BAR"</span><span class="special">};</span>
</pre>
<p>
          While this looks fancy at first, it really does not scale well with more
          parameters. For process v2, the interfaces is simple:
        </p>
<pre class="programlisting"><span class="keyword">extern</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">unordered_map</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="identifier">my_env</span><span class="special">;</span>
<span class="keyword">extern</span> <span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"./test"</span><span class="special">,</span> <span class="special">{</span><span class="string">"--help"</span><span class="special">},</span> <span class="identifier">process_io</span><span class="special">{</span><span class="keyword">nullptr</span><span class="special">,</span> <span class="special">{},</span> <span class="special">{}},</span> <span class="identifier">process_environment</span><span class="special">(</span><span class="identifier">my_env</span><span class="special">));</span>
</pre>
<p>
          Every initializer addresses one logical component (e.g. stdio) instead
          of multiple ones accumulating. Furthermore, every process has a path and
          arguments, instead of a confusing mixture of cmd-style and exe-args that
          can be randomly spread out.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.pidfd_open"></a><a class="link" href="v2.html#boost_process.v2.introduction.pidfd_open" title="pidfd_open">pidfd_open</a>
</h4></div></div></div>
<p>
          Since process v1 came out, linux has moved along and added pidfd_open which
          allows users to get a file descriptor for a process. This is much more
          reliable since it is not as easy to miss as a <code class="computeroutput"><span class="identifier">SIGCHLD</span></code>.
          FreeBSD has a similar feature with <code class="computeroutput"><span class="identifier">pdfork</span></code>
          which is also supported, while windows has provided <code class="computeroutput"><span class="identifier">HANDLE</span></code>s
          for processes all along. Unless the OS doesn't support it, process v2 will
          use file descriptors and handles to implement waiting for processes.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.asio"></a><a class="link" href="v2.html#boost_process.v2.introduction.asio" title="Full asio integration">Full asio integration</a>
</h4></div></div></div>
<p>
          Process v1 aimed to make asio optional, but synchronous IO with subprocesses
          usually means one is begging for deadlocks. Since asio added pipes in boost
          1.78, boost process V2 is fully asio based and uses it's pipes and file-handles
          for the subprocess.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.unreliable"></a><a class="link" href="v2.html#boost_process.v2.introduction.unreliable" title="Unreliable functionality">Unreliable
        functionality</a>
</h4></div></div></div>
<p>
          Certain parts of boost.process were not as reliable as they should've been.
        </p>
<p>
          This concerns especially the <code class="computeroutput"><span class="identifier">wait_for</span></code>
          and <code class="computeroutput"><span class="identifier">wait_until</span></code> functions
          on the process. The latter are easy to do on windows, but posix does not
          provide an API for this. Thus the wait_for used signals or fork, which
          was all but safe. Since process v2 is based on asio and thus supports cancellation,
          a wait_for can not safely be implemented with an async_wait + timeout.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.utf8"></a><a class="link" href="v2.html#boost_process.v2.introduction.utf8" title="UTF-8">UTF-8</a>
</h4></div></div></div>
<p>
          <span class="quote">“<span class="quote">UTF-8 or GTFO</span>”</span>--Vinnie Falco
        </p>
<p>
          Instead of using ascii-APIs on windows, process V2 just assumes UTF-8 everywhere.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.src"></a><a class="link" href="v2.html#boost_process.v2.introduction.src" title="Separate compilation">Separate compilation</a>
</h4></div></div></div>
<p>
          Boost.process v2 supports separate compilation similar to other boost libraries.
          It can be achieved by defining <code class="computeroutput"><span class="identifier">BOOST_PROCESS_V2_SEPARATE_COMPILATION</span></code>
          and including <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">process</span><span class="special">/</span><span class="identifier">v2</span><span class="special">/</span><span class="identifier">src</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
          in a single compile unit.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.introduction.limit_fd"></a><a class="link" href="v2.html#boost_process.v2.introduction.limit_fd" title="Fd safe by default">Fd safe by
        default</a>
</h4></div></div></div>
<p>
          While not a problem on windows (since HANDLEs get manually enabled for
          inheritance), posix systems create a problem with inheriting file handles
          by default.
        </p>
<p>
          Process V2 will automatically close all non-whitelisted descriptors, without
          needing any option to enable it.
        </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.quickstart"></a><a class="link" href="v2.html#boost_process.v2.quickstart" title="Quickstart">Quickstart</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#boost_process.v2.quickstart.lifetime">Lifetime</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.quickstart.signal">Signalling the
        subprocess</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.quickstart.execute">Execute functions</a></span></dt>
</dl></div>
<p>
        A process needs four things to be launched:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
            an asio execution_context / executor
          </li>
<li class="listitem">
            a path to an executable
          </li>
<li class="listitem">
            a list of arguments
          </li>
<li class="listitem">
            a variadic set of initializers
          </li>
</ul></div>
<p>
</p>
<pre class="programlisting"> <span class="comment">// process(asio::any_io_executor, filesystem::path, range&lt;string&gt; args, AdditionalInitializers...)</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"/usr/bin/cp"</span><span class="special">,</span> <span class="special">{</span><span class="string">"source.txt"</span><span class="special">,</span> <span class="string">"target.txt"</span><span class="special">});</span>
</pre>
<p>
      </p>
<p>
        The started process can then be awaited or terminated.
      </p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.quickstart.lifetime"></a><a class="link" href="v2.html#boost_process.v2.quickstart.lifetime" title="Lifetime">Lifetime</a>
</h4></div></div></div>
<p>
          If the process handle goes out of scope, it will terminate the subprocess.
          You can prevent this, by calling <code class="computeroutput"><span class="identifier">proc</span><span class="special">.</span><span class="identifier">detach</span><span class="special">()</span></code>; do however note that this can lead to
          zombie processes.
        </p>
<p>
          A process that completed will deliver an exit-code, which can be obtained
          by calling <code class="computeroutput"><span class="special">.</span><span class="identifier">exit_code</span></code>
          on the exited process and which is also returned from <code class="computeroutput"><span class="special">.</span><span class="identifier">wait</span><span class="special">()</span></code>.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="string">"/bin/ls"</span><span class="special">,</span> <span class="special">{});</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">()</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
</pre>
<p>
        </p>
<p>
          The normal exit-code is what the subprocess returned from <code class="computeroutput"><span class="identifier">main</span></code>; posix will however add additional
          information about the process. This is called the <code class="computeroutput"><span class="identifier">native_exit_code</span></code>.
        </p>
<p>
          The <code class="computeroutput"><span class="special">.</span><span class="identifier">running</span><span class="special">()</span></code> function can be used to detect if the
          process is still active.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.quickstart.signal"></a><a class="link" href="v2.html#boost_process.v2.quickstart.signal" title="Signalling the subprocess">Signalling the
        subprocess</a>
</h4></div></div></div>
<p>
          The parent process can signal the subprocess demanding certain actions.
        </p>
<p>
          <code class="computeroutput"><span class="special">.</span><span class="identifier">terminate</span></code>
          will cause the subprocess to exit immediately (<code class="computeroutput"><span class="identifier">SIGKILL</span></code>
          on posix). This is the only reliable &amp; portable way to end a subprocess.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="string">"/bin/totally-not-a-virus"</span><span class="special">,</span> <span class="special">{});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">terminate</span><span class="special">();</span>
</pre>
<p>
        </p>
<p>
          <code class="computeroutput"><span class="special">.</span><span class="identifier">request_exit</span></code>
          will ask the subprocess to shutdown (<code class="computeroutput"><span class="identifier">SIGTERM</span></code>
          on posix), which the subprocess might ignore.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="string">"/bin/bash"</span><span class="special">,</span> <span class="special">{});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">request_exit</span><span class="special">();</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
<p>
          <code class="computeroutput"><span class="special">.</span><span class="identifier">interrupt</span></code>
          will send an SIGINT to the subprocess, which a subprocess might interpret
          as a signal to shutdown.
        </p>
<div class="warning"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top"><p>
            interrupt requires the initializer <code class="computeroutput"><span class="identifier">windows</span><span class="special">::</span><span class="identifier">create_new_process_group</span></code>
            to be set
          </p></td></tr>
</table></div>
<p>
</p>
<pre class="programlisting"><span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="string">"/usr/bin/addr2line"</span><span class="special">,</span> <span class="special">{});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">request_exit</span><span class="special">();</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.quickstart.execute"></a><a class="link" href="v2.html#boost_process.v2.quickstart.execute" title="Execute functions">Execute functions</a>
</h4></div></div></div>
<p>
          Process v2 provides <code class="computeroutput"><span class="identifier">execute</span></code>
          and <code class="computeroutput"><span class="identifier">async_execute</span></code> functions
          that can be used for managed executions.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">assert</span><span class="special">(</span><span class="identifier">execute</span><span class="special">(</span><span class="identifier">process</span><span class="special">(</span><span class="string">"/bin/ls"</span><span class="special">,</span> <span class="special">{})</span> <span class="special">==</span> <span class="number">0</span><span class="special">));</span>
</pre>
<p>
        </p>
<p>
          The async version supports cancellation and will forward cancellation types
          as follows:
        </p>
<p>
          - asio::cancellation_type::total -&gt; interrupt - asio::cancellation_type::partial
          -&gt; request_exit - asio::cancellation_type::terminal -&gt; terminate
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">steady_timer</span> <span class="identifier">timeout</span><span class="special">{</span><span class="identifier">ctx</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">10</span><span class="special">)};</span>

<span class="identifier">asio</span><span class="special">::</span><span class="identifier">cancellation_signal</span> <span class="identifier">sig</span><span class="special">;</span>
<span class="identifier">async_execute</span><span class="special">(</span><span class="identifier">process</span><span class="special">(</span><span class="string">"/usr/bin/g++"</span><span class="special">,</span> <span class="special">{</span><span class="string">"hello_world.cpp"</span><span class="special">}),</span>
             <span class="identifier">asio</span><span class="special">::</span><span class="identifier">bind_cancellation_slot</span><span class="special">(</span><span class="identifier">sig</span><span class="special">.</span><span class="identifier">slot</span><span class="special">(),</span>
                                          <span class="special">[&amp;](</span><span class="identifier">error_code</span> <span class="identifier">ec</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">exit_code</span><span class="special">)</span>
                                          <span class="special">{</span>
                                              <span class="identifier">timeout</span><span class="special">.</span><span class="identifier">cancel</span><span class="special">();</span> <span class="comment">// we're done earlier</span>
                                          <span class="special">}));</span>

<span class="identifier">timeout</span><span class="special">.</span><span class="identifier">async_wait</span><span class="special">(</span>
    <span class="special">[&amp;](</span><span class="identifier">error_code</span> <span class="identifier">ec</span><span class="special">)</span>
    <span class="special">{</span>
        <span class="keyword">if</span> <span class="special">(</span><span class="identifier">ec</span><span class="special">)</span> <span class="comment">// we were cancelled, do nothing</span>
            <span class="keyword">return</span> <span class="special">;</span>
        <span class="identifier">sig</span><span class="special">.</span><span class="identifier">emit</span><span class="special">(</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">cancellation_type</span><span class="special">::</span><span class="identifier">partial</span><span class="special">);</span>
        <span class="comment">// request exit first, but terminate after another 10 sec</span>
        <span class="identifier">timeout</span><span class="special">.</span><span class="identifier">expires_after</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">10</span><span class="special">));</span>
        <span class="identifier">timeout</span><span class="special">.</span><span class="identifier">async_wait</span><span class="special">(</span>
            <span class="special">[&amp;](</span><span class="identifier">error_code</span> <span class="identifier">ec</span><span class="special">)</span>
            <span class="special">{</span>
                <span class="keyword">if</span> <span class="special">(!</span><span class="identifier">ec</span><span class="special">)</span>
                    <span class="identifier">sig</span><span class="special">.</span><span class="identifier">emit</span><span class="special">(</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">cancellation_type</span><span class="special">::</span><span class="identifier">terminal</span><span class="special">);</span>
            <span class="special">});</span>
    <span class="special">});</span>
</pre>
<p>
        </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.launchers"></a><a class="link" href="v2.html#boost_process.v2.launchers" title="Launcher">Launcher</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#boost_process.v2.launchers.linux">Linux Launchers</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.launchers.windows">Windows Launchers</a></span></dt>
</dl></div>
<p>
        The process creation is done by a process_launcher. The constructor of <code class="computeroutput"><span class="identifier">process</span></code> will use the default_launcher,
        which varies by system. There are additional launcher available on most systems.
      </p>
<div class="table">
<a name="boost_process.v2.launchers.launchers"></a><p class="title"><b>Table 28.2. Launcher overview</b></p>
<div class="table-contents"><table class="table" summary="Launcher overview">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Summary
                </p>
              </th>
<th>
                <p>
                  Default on
                </p>
              </th>
<th>
                <p>
                  Available on
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">windows</span><span class="special">::</span><span class="identifier">default_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using <code class="computeroutput"><span class="identifier">CreateProcessW</span></code>
                </p>
              </td>
<td>
                <p>
                  windows
                </p>
              </td>
<td>
                <p>
                  windows
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">windows</span><span class="special">::</span><span class="identifier">as_user_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using <code class="computeroutput"><span class="identifier">CreateProcessAsUserW</span></code>
                </p>
              </td>
<td>
              </td>
<td>
                <p>
                  windows
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">windows</span><span class="special">::</span><span class="identifier">with_logon_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using <code class="computeroutput"><span class="identifier">CreateProcessWithLogonW</span></code>
                </p>
              </td>
<td>
              </td>
<td>
                <p>
                  windows
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">windows</span><span class="special">::</span><span class="identifier">with_token_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using <code class="computeroutput"><span class="identifier">CreateProcessWithTokenW</span></code>
                </p>
              </td>
<td>
              </td>
<td>
                <p>
                  windows
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">posix</span><span class="special">::</span><span class="identifier">default_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using fork &amp; an error pipe
                </p>
              </td>
<td>
                <p>
                  most of posix
                </p>
              </td>
<td>
                <p>
                  posix
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">posix</span><span class="special">::</span><span class="identifier">fork_and_forget</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using fork without error pipe
                </p>
              </td>
<td>
              </td>
<td>
                <p>
                  posix
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">posix</span><span class="special">::</span><span class="identifier">pdfork_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using pdfork with an error pipe
                </p>
              </td>
<td>
                <p>
                  FreeBSD
                </p>
              </td>
<td>
                <p>
                  FreeBSD
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">posix</span><span class="special">::</span><span class="identifier">vfork_launcher</span></code>
                </p>
              </td>
<td>
                <p>
                  Launcher using vfork
                </p>
              </td>
<td>
              </td>
<td>
                <p>
                  posix
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
        A launcher is invoked through the call operator.
      </p>
<p>
</p>
<pre class="programlisting"><span class="keyword">auto</span> <span class="identifier">l</span> <span class="special">=</span> <span class="identifier">windows</span><span class="special">::</span><span class="identifier">as_user_launcher</span><span class="special">((</span><span class="identifier">HANDLE</span><span class="special">)</span><span class="number">0xDEADBEEF</span><span class="special">);</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="identifier">ec</span><span class="special">;</span>
<span class="keyword">auto</span> <span class="identifier">proc</span> <span class="special">=</span> <span class="identifier">l</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="identifier">ec</span><span class="special">,</span> <span class="string">"C:\\User\\boost\\Downloads\\totally_not_a_virus.exe"</span><span class="special">,</span> <span class="special">{});</span>
</pre>
<p>
      </p>
<p>
        The launcher will call certain functions on the initializer if they're present,
        as documented below. The initializer are used to modify the process behaviour.
      </p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.launchers.linux"></a><a class="link" href="v2.html#boost_process.v2.launchers.linux" title="Linux Launchers">Linux Launchers</a>
</h4></div></div></div>
<p>
          The default and pdfork launchers on linux open an internal pipe to communicate
          errors that occur after forking back to the parent process.
        </p>
<p>
          This can be prevented by using the <code class="computeroutput"><span class="identifier">fork_and_forget_launcher</span></code>.
          Alternatively, the <code class="computeroutput"><span class="identifier">vfork_launcher</span></code>
          can report errors directly back to the parent process.
        </p>
<p>
          Thus some calls to the initializers occur after forking from the child
          process.
        </p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">custom_initializer</span>
<span class="special">{</span>
    <span class="comment">// functions called from the parent process:</span>


    <span class="comment">// called before a call to fork. A returned error will cancel the launch.</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="identifier">error_code</span> <span class="identifier">on_setup</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">));</span>

    <span class="comment">// called for every initializer if an error occurred during setup or process creation</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_error</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">),</span>
                  <span class="keyword">const</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>

    <span class="comment">// called after successful process creation</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_success</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">));</span>

    <span class="comment">// called for every initializer if an error occurred when forking, in addition to on_error.</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_fork_error</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">),</span>
                       <span class="keyword">const</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>


    <span class="comment">// called before a call to execve. A returned error will cancel the launch. Called from the child process.</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="identifier">error_code</span> <span class="identifier">on_exec_setup</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">));</span>


    <span class="comment">// called after a failed call to execve from the child process.</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_exec_error</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">(&amp;</span><span class="identifier">cmd_line</span><span class="special">));</span>
<span class="special">};</span>
</pre>
<p>
        </p>
<p>
          The call sequence on success: <img src="posix_success.svg">
        </p>
<p>
          The call sequence when fork fails: <img src="posix_fork_err.svg">
        </p>
<p>
          The call sequence when exec fails: <img src="posix_exec_err.svg">
        </p>
<p>
          The launcher will close all non-whitelisted file descriptors after <code class="computeroutput"><span class="identifier">on_exec_setup</span></code>.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.launchers.windows"></a><a class="link" href="v2.html#boost_process.v2.launchers.windows" title="Windows Launchers">Windows Launchers</a>
</h4></div></div></div>
<p>
          Windows launchers are pretty straight forward, they will call the following
          functions on the initializer if present.
        </p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">custom_initializer</span>
<span class="special">{</span>
    <span class="comment">// called before a call to CreateProcess. A returned error will cancel the launch.</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="identifier">error_code</span> <span class="identifier">on_setup</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> <span class="special">&amp;</span><span class="identifier">cmd_line</span><span class="special">);</span>

    <span class="comment">// called for every initializer if an error occurred during setup or process creation</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_error</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> <span class="special">&amp;</span><span class="identifier">cmd_line</span><span class="special">,</span>
                  <span class="keyword">const</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>

    <span class="comment">// called after successful process creation</span>
    <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Launcher</span><span class="special">&gt;</span>
    <span class="keyword">void</span> <span class="identifier">on_success</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;</span> <span class="identifier">launcher</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <span class="special">&amp;</span><span class="identifier">executable</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span> <span class="special">&amp;</span><span class="identifier">cmd_line</span><span class="special">);</span>

<span class="special">};</span>
</pre>
<p>
        </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
            All the additional launchers for windows inherit <code class="computeroutput"><span class="identifier">default_launcher</span></code>
          </p></td></tr>
</table></div>
<p>
          The call sequence is as follows: <img src="windows_exec.svg">
        </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.start_dir"></a><a class="link" href="v2.html#boost_process.v2.start_dir" title="process_start_dir">process_start_dir</a>
</h3></div></div></div>
<p>
        The easier initializer to use is <code class="computeroutput"><span class="identifier">process_start_dir</span></code>:
      </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">process</span> <span class="identifier">ls</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"/ls"</span><span class="special">,</span> <span class="special">{},</span> <span class="identifier">process_start_dir</span><span class="special">(</span><span class="string">"/home"</span><span class="special">));</span>
<span class="identifier">ls</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
      </p>
<p>
        This will run <code class="computeroutput"><span class="identifier">ls</span></code> in the folder
        <code class="computeroutput"><span class="special">/</span><span class="identifier">home</span></code>
        instead of the current folder.
      </p>
<div class="warning"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top"><p>
          If your path is relative, it may fail on posix, because the directory is
          changed before a call to execve.
        </p></td></tr>
</table></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.stdio"></a><a class="link" href="v2.html#boost_process.v2.stdio" title="stdio">stdio</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio.pipe">Pipe</a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio.file"><code class="computeroutput"><span class="identifier">FILE</span><span class="special">*</span></code></a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio.null"><code class="computeroutput"><span class="keyword">nullptr</span></code></a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio.native_handle"><code class="computeroutput"><span class="identifier">native_handle</span></code></a></span></dt>
<dt><span class="section"><a href="v2.html#boost_process.v2.stdio.popen">popen</a></span></dt>
</dl></div>
<p>
        When using io with a subprocess, all three standard streams (stdin, stdout,
        stderr) get set for the child-process. The default setting is to inherit
        the parent process.
      </p>
<p>
        This feature meant to be flexible, which is why there is little checking
        on the arguments assigned to one of those streams.
      </p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.stdio.pipe"></a><a class="link" href="v2.html#boost_process.v2.stdio.pipe" title="Pipe">Pipe</a>
</h4></div></div></div>
<p>
          asio pipes can be used for io. When using in process_stdio they will get
          automatically connected and the other side will get assigned to the child
          process:
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">readable_pipe</span> <span class="identifier">rp</span><span class="special">;</span>

<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"/usr/bin/g++"</span><span class="special">,</span> <span class="special">{</span><span class="string">"--version"</span><span class="special">},</span> <span class="identifier">process_stdio</span><span class="special">{{</span> <span class="comment">/* in to default */</span><span class="special">},</span> <span class="identifier">rp</span><span class="special">,</span> <span class="special">{</span> <span class="comment">/* err to default */</span> <span class="special">}});</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">output</span><span class="special">;</span>

<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="identifier">ec</span><span class="special">;</span>
<span class="identifier">rp</span><span class="special">.</span><span class="identifier">read</span><span class="special">(</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">dynamic_buffer</span><span class="special">(</span><span class="identifier">output</span><span class="special">),</span> <span class="identifier">ec</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">ec</span> <span class="special">==</span> <span class="identifier">asio</span><span class="special">::</span><span class="identifier">eof</span><span class="special">);</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
<p>
          readable pipes can be assigned to <code class="computeroutput"><span class="identifier">out</span></code>
          an <code class="computeroutput"><span class="identifier">err</span></code>, while writable_pipes
          can be assigned to <code class="computeroutput"><span class="identifier">in</span></code>.
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.stdio.file"></a><a class="link" href="v2.html#boost_process.v2.stdio.file" title="FILE*"><code class="computeroutput"><span class="identifier">FILE</span><span class="special">*</span></code></a>
</h4></div></div></div>
<p>
          <code class="computeroutput"><span class="identifier">FILE</span><span class="special">*</span></code>
          can also be used for either side; this allows the <code class="computeroutput"><span class="identifier">stdin</span></code>,
          <code class="computeroutput"><span class="identifier">stderr</span></code>, <code class="computeroutput"><span class="identifier">stdout</span></code>
          macros to be used:
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="comment">// forward both stderr &amp; stdout to stdout of the parent process</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"/usr/bin/g++"</span><span class="special">,</span> <span class="special">{</span><span class="string">"--version"</span><span class="special">},</span> <span class="identifier">process_stdio</span><span class="special">{{</span> <span class="comment">/* in to default */</span><span class="special">},</span> <span class="identifier">stdout</span><span class="special">,</span> <span class="identifier">stdout</span><span class="special">});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.stdio.null"></a><a class="link" href="v2.html#boost_process.v2.stdio.null" title="nullptr"><code class="computeroutput"><span class="keyword">nullptr</span></code></a>
</h4></div></div></div>
<p>
          <code class="computeroutput"><span class="keyword">nullptr</span></code> may be used to set
          a given stream to be opened on the null-device (<code class="computeroutput"><span class="special">/</span><span class="identifier">dev</span><span class="special">/</span><span class="identifier">null</span></code> on posix, <code class="computeroutput"><span class="identifier">NUL</span></code>
          on windows). This is used to ignore output or give only EOF as input.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="comment">// ignore stderr</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"/usr/bin/g++"</span><span class="special">,</span> <span class="special">{</span><span class="string">"--version"</span><span class="special">},</span> <span class="identifier">process_stdio</span><span class="special">{{</span> <span class="comment">/* in to default */</span><span class="special">},</span> <span class="special">{},</span> <span class="keyword">nullptr</span><span class="special">});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.stdio.native_handle"></a><a class="link" href="v2.html#boost_process.v2.stdio.native_handle" title="native_handle"><code class="computeroutput"><span class="identifier">native_handle</span></code></a>
</h4></div></div></div>
<p>
          A native handle can be used as well, which means an <code class="computeroutput"><span class="keyword">int</span></code>
          on posix or a <code class="computeroutput"><span class="identifier">HANDLE</span></code> on
          windows. Furthermore, any object that has a <code class="computeroutput"><span class="identifier">native_handle</span></code>
          returning that native handle type is valid, too.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="comment">// ignore stderr</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span> <span class="identifier">sock</span><span class="special">{</span><span class="identifier">ctx</span><span class="special">};</span>
<span class="identifier">connect_my_socket</span><span class="special">(</span><span class="identifier">sock</span><span class="special">);</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="string">"~/not-a-virus"</span><span class="special">,</span> <span class="special">{},</span> <span class="identifier">process_stdio</span><span class="special">{</span><span class="identifier">sock</span><span class="special">,</span> <span class="identifier">sock</span><span class="special">,</span> <span class="keyword">nullptr</span><span class="special">});</span>
<span class="identifier">proc</span><span class="special">.</span><span class="identifier">wait</span><span class="special">();</span>
</pre>
<p>
        </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.stdio.popen"></a><a class="link" href="v2.html#boost_process.v2.stdio.popen" title="popen">popen</a>
</h4></div></div></div>
<p>
          Additionally, process v2 provides a <code class="computeroutput"><span class="identifier">popen</span></code>
          class. It starts a process and connects pipes for stdin and stdout, so
          that the popen object can be used as a stream.
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">popen</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">executor</span><span class="special">,</span> <span class="string">"/usr/bin/addr2line, {argv[0]});
asio::write(proc, asio::buffer("</span><span class="identifier">main</span><span class="special">\</span><span class="identifier">n</span><span class="error">"</span><span class="special">));</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">line</span><span class="special">;</span>
<span class="identifier">asio</span><span class="special">::</span><span class="identifier">read_until</span><span class="special">(</span><span class="identifier">proc</span><span class="special">,</span> <span class="identifier">asio</span><span class="special">::</span><span class="identifier">dynamic_buffer</span><span class="special">(</span><span class="identifier">line</span><span class="special">),</span> <span class="char">'\n'</span><span class="special">);</span>
</pre>
<p>
        </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_process.v2.env"></a><a class="link" href="v2.html#boost_process.v2.env" title="Environment">Environment</a>
</h3></div></div></div>
<div class="toc"><dl class="toc"><dt><span class="section"><a href="v2.html#boost_process.v2.env.process_env">Subprocess environment</a></span></dt></dl></div>
<p>
        The <code class="computeroutput"><span class="identifier">environment</span></code> namespace
        provides all sorts of facilities to query and manipulate the environment
        of the current process.
      </p>
<p>
        The api should be straight forward, but one oddity that needs to be pointed
        out is, that environment names are not case sensitive on windows. The key_traits
        class implements the proper traits depending on the current system.
      </p>
<p>
        Additionally, environment can be lists separated by <code class="computeroutput"><span class="special">:</span></code>
        or <code class="computeroutput"><span class="special">;</span></code>; <code class="computeroutput"><span class="identifier">environment</span><span class="special">::</span><span class="identifier">value</span></code>
        and <code class="computeroutput"><span class="identifier">environment</span><span class="special">::</span><span class="identifier">value_view</span></code> can be used to iterate those.
      </p>
<p>
        Beyond that, the requirements on an environment are a low as possible; an
        environment is either a list of strings or a list of string-pairs. It is
        however recommended to use the environment types, as to have the right value
        comparisons.
      </p>
<p>
        To note is the <code class="computeroutput"><span class="identifier">find_executable</span></code>
        functions, which searches in an environment for an executable.
      </p>
<p>
</p>
<pre class="programlisting"><span class="comment">// search in the current environment</span>
<span class="keyword">auto</span> <span class="identifier">exe</span> <span class="special">=</span> <span class="identifier">environment</span><span class="special">::</span><span class="identifier">find_executable</span><span class="special">(</span><span class="string">"g++"</span><span class="special">);</span>

<span class="identifier">std</span><span class="special">::</span><span class="identifier">unordered_map</span><span class="special">&lt;</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key</span><span class="special">,</span> <span class="identifier">environment</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="identifier">my_env</span> <span class="special">=</span>
    <span class="special">{</span>
        <span class="special">{</span><span class="string">"SECRET"</span><span class="special">,</span> <span class="string">"THIS_IS_A_TEST"</span><span class="special">},</span>
        <span class="special">{</span><span class="string">"PATH"</span><span class="special">,</span> <span class="special">{</span><span class="string">"/bin"</span><span class="special">,</span> <span class="string">"/usr/bin"</span><span class="special">}}</span>
    <span class="special">};</span>

<span class="keyword">auto</span> <span class="identifier">other_exe</span> <span class="special">=</span> <span class="identifier">environment</span><span class="special">::</span><span class="identifier">find_executable</span><span class="special">(</span><span class="string">"g++"</span><span class="special">,</span> <span class="identifier">my_env</span><span class="special">);</span>
</pre>
<p>
      </p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_process.v2.env.process_env"></a><a class="link" href="v2.html#boost_process.v2.env.process_env" title="Subprocess environment">Subprocess environment</a>
</h4></div></div></div>
<p>
          The subprocess environment assignment follows the same constraints:
        </p>
<p>
</p>
<pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_context</span> <span class="identifier">ctx</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">unordered_map</span><span class="special">&lt;</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key</span><span class="special">,</span> <span class="identifier">environment</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="identifier">my_env</span> <span class="special">=</span>
    <span class="special">{</span>
        <span class="special">{</span><span class="string">"SECRET"</span><span class="special">,</span> <span class="string">"THIS_IS_A_TEST"</span><span class="special">},</span>
        <span class="special">{</span><span class="string">"PATH"</span><span class="special">,</span> <span class="special">{</span><span class="string">"/bin"</span><span class="special">,</span> <span class="string">"/usr/bin"</span><span class="special">}}</span>
    <span class="special">};</span>
<span class="keyword">auto</span> <span class="identifier">exe</span> <span class="special">=</span> <span class="identifier">find_executable</span><span class="special">(</span><span class="string">"g++"</span><span class="special">);</span>
<span class="identifier">process</span> <span class="identifier">proc</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="identifier">exe</span><span class="special">,</span> <span class="special">{</span><span class="string">"main.cpp"</span><span class="special">},</span> <span class="identifier">process_environment</span><span class="special">(</span><span class="identifier">my_env</span><span class="special">));</span>
<span class="identifier">process</span> <span class="identifier">pro2</span><span class="special">(</span><span class="identifier">ctx</span><span class="special">,</span> <span class="identifier">exe</span><span class="special">,</span> <span class="special">{</span><span class="string">"test.cpp"</span><span class="special">},</span> <span class="identifier">process_environment</span><span class="special">(</span><span class="identifier">my_env</span><span class="special">));</span>
</pre>
<p>
        </p>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="process.reference"></a>Reference</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="v2.html#header.boost.process.v2.bind_launcher_hpp">Header &lt;boost/process/v2/bind_launcher.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.cstring_ref_hpp">Header &lt;boost/process/v2/cstring_ref.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.default_launcher_hpp">Header &lt;boost/process/v2/default_launcher.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.environment_hpp">Header &lt;boost/process/v2/environment.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.error_hpp">Header &lt;boost/process/v2/error.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.execute_hpp">Header &lt;boost/process/v2/execute.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.exit_code_hpp">Header &lt;boost/process/v2/exit_code.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.pid_hpp">Header &lt;boost/process/v2/pid.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.popen_hpp">Header &lt;boost/process/v2/popen.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.process_hpp">Header &lt;boost/process/v2/process.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.process_handle_hpp">Header &lt;boost/process/v2/process_handle.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.shell_hpp">Header &lt;boost/process/v2/shell.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.src_hpp">Header &lt;boost/process/v2/src.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.start_dir_hpp">Header &lt;boost/process/v2/start_dir.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="v2.html#header.boost.process.v2.stdio_hpp">Header &lt;boost/process/v2/stdio.hpp&gt;</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.bind_launcher_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/bind_launcher.hpp" target="_top">boost/process/v2/bind_launcher.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Launcher<span class="special">,</span> <span class="keyword">typename</span> <span class="special">...</span> Init<span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/bound_launcher.html" title="Struct template bound_launcher">bound_launcher</a><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Launcher<span class="special">,</span> <span class="keyword">typename</span> <span class="special">...</span> Init<span class="special">&gt;</span> 
        <span class="keyword">auto</span> <a name="boost.process.v2.bind_launcher"></a><span class="identifier">bind_launcher</span><span class="special">(</span><span class="identifier">Launcher</span> <span class="special">&amp;&amp;</span> launcher<span class="special">,</span> <span class="identifier">Init</span> <span class="special">&amp;&amp;</span><span class="special">...</span> init<span class="special">)</span><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="special">...</span> Init<span class="special">&gt;</span> <span class="keyword">auto</span> <a name="boost.process.v2.bind_default_launcher"></a><span class="identifier">bind_default_launcher</span><span class="special">(</span><span class="identifier">Init</span> <span class="special">&amp;&amp;</span><span class="special">...</span> init<span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.cstring_ref_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/cstring_ref.hpp" target="_top">boost/process/v2/cstring_ref.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span> <span class="special">&gt;</span> 
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">;</span>

      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="keyword">char</span> <span class="special">&gt;</span> <a name="boost.process.v2.cstring_ref"></a><span class="identifier">cstring_ref</span><span class="special">;</span>
      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="keyword">wchar_t</span> <span class="special">&gt;</span> <a name="boost.process.v2.wcstring_ref"></a><span class="identifier">wcstring_ref</span><span class="special">;</span>
      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="keyword">char16_t</span> <span class="special">&gt;</span> <a name="boost.process.v2.u16cstring_ref"></a><span class="identifier">u16cstring_ref</span><span class="special">;</span>
      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="keyword">char32_t</span> <span class="special">&gt;</span> <a name="boost.process.v2.u32cstring_ref"></a><span class="identifier">u32cstring_ref</span><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> charT<span class="special">,</span> <span class="keyword">typename</span> traits<span class="special">&gt;</span> 
        <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
        <a name="boost.process.v2.operator_idm6886"></a><span class="keyword">operator</span><span class="special">&lt;&lt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> os<span class="special">,</span> 
                   <span class="keyword">const</span> <a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> str<span class="special">)</span><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> charT<span class="special">,</span> <span class="keyword">typename</span> traits<span class="special">&gt;</span> 
        <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.process.v2.hash_value"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="identifier">basic_string_view</span><span class="special">&lt;</span> <span class="identifier">charT</span><span class="special">,</span> <span class="identifier">traits</span> <span class="special">&gt;</span> s<span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.default_launcher_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/default_launcher.hpp" target="_top">boost/process/v2/default_launcher.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a class="link" href="../boost/process/v2/default_process_launcher.html" title="Type definition default_process_launcher"><span class="identifier">default_process_launcher</span></a><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.environment_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/environment.hpp" target="_top">boost/process/v2/environment.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/process_environment.html" title="Struct process_environment">process_environment</a><span class="special">;</span>
      <span class="keyword">namespace</span> <span class="identifier">environment</span> <span class="special">{</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/current_view.html" title="Struct current_view">current_view</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/key_value_pair.html" title="Struct key_value_pair">key_value_pair</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/key_view.html" title="Struct key_view">key_view</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/value_iterator.html" title="Struct value_iterator">value_iterator</a><span class="special">;</span>
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a><span class="special">;</span>
        <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a class="link" href="../boost/process/v2/environment/key_char_traits.html" title="Type definition key_char_traits"><span class="identifier">key_char_traits</span></a><span class="special">;</span>
        <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a class="link" href="../boost/process/v2/environment/value_char_traits.html" title="Type definition value_char_traits"><span class="identifier">value_char_traits</span></a><span class="special">;</span>
        <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="boost.process.v2.environment.char_type"></a><span class="identifier">char_type</span><span class="special">;</span>  <span class="comment">// The character type used by the environment. Either <code class="computeroutput">char</code> or <code class="computeroutput">wchar_t</code>. </span>
        <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="boost.process.v2.environment.native_handle"></a><span class="identifier">native_handle</span><span class="special">;</span>  <span class="comment">// The native handle of an environment. Note that this can be an owning pointer and is generally not thread safe. </span>

        <span class="keyword">constexpr</span> <span class="identifier">char_type</span> <a class="link" href="../boost/process/v2/environment/equality_sign.html" title="Global equality_sign">equality_sign</a><span class="special">;</span>        <span class="comment">// The equal character in an environment string used to separate key and value. </span>
        <span class="keyword">constexpr</span> <span class="identifier">char_type</span> <a class="link" href="../boost/process/v2/environment/delimiter.html" title="Global delimiter">delimiter</a><span class="special">;</span>        <span class="comment">// The delimiter in environemtn lists. Commonly used by the <code class="computeroutput">PATH</code> variable. </span>
        <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.process.v2.environment.hash_value_idm7964"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_view.html" title="Struct key_view">key_view</a> <span class="special">&amp;</span> value<span class="special">)</span><span class="special">;</span>
        <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.process.v2.environment.hash_value_idm7969"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">boost::process::v2::environment::value_view</a> <span class="special">&amp;</span> value<span class="special">)</span><span class="special">;</span>
        <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.process.v2.environment.hash_value_idm7974"></a><span class="identifier">hash_value</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">boost::process::v2::environment::key_value_pair_view</a> <span class="special">&amp;</span> value<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator==_idm7979"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator!=_idm7986"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_=_idm7993"></a><span class="keyword">operator</span><span class="special">&lt;=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_idm8000"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_idm8007"></a><span class="keyword">operator</span><span class="special">&gt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_=_idm8014"></a><span class="keyword">operator</span><span class="special">&gt;=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> value_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator==_idm8021"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> 
                        <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator!=_idm8028"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> 
                        <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_=_idm8035"></a><span class="keyword">operator</span><span class="special">&lt;=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> 
                        <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_idm8042"></a><span class="keyword">operator</span><span class="special">&lt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_idm8049"></a><span class="keyword">operator</span><span class="special">&gt;</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>
        <span class="keyword">bool</span> <a name="boost.process.v2.environment.operator_=_idm8056"></a><span class="keyword">operator</span><span class="special">&gt;=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">key_value_pair_view</a> <span class="special">&amp;</span><span class="special">,</span> 
                        <span class="keyword">const</span> key_value_pair_view<span class="special">)</span><span class="special">;</span>

        <span class="comment">// Obtain a handle to the current environment. </span>
        <a class="link" href="../boost/process/v2/environment/current_view.html" title="Struct current_view">current_view</a> <a name="boost.process.v2.environment.current"></a><span class="identifier">current</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Environment <span class="special">=</span> <span class="identifier">current_view</span><span class="special">&gt;</span> 
          <span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> <a class="link" href="../boost/process/v2/environment/home.html" title="Function template home"><span class="identifier">home</span></a><span class="special">(</span><span class="identifier">Environment</span> <span class="special">&amp;&amp;</span> <span class="special">=</span> <span class="identifier">current</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Environment <span class="special">=</span> <span class="identifier">current_view</span><span class="special">&gt;</span> 
          <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span> 
          <a class="link" href="../boost/process/v2/environment/find_executable.html" title="Function template find_executable"><span class="identifier">find_executable</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">filesystem</span><span class="special">::</span><span class="identifier">path</span><span class="special">,</span> 
                          <span class="identifier">Environment</span> <span class="special">&amp;&amp;</span> <span class="special">=</span> <span class="identifier">current</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>

        <span class="comment">// Get an environment variable from the current process. </span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8124"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8133"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8139"></a><span class="identifier">get</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                  <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8147"></a><span class="identifier">get</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">)</span><span class="special">;</span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8153"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> c<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <a class="link" href="../boost/process/v2/environment/value.html" title="Struct value">value</a> <a name="boost.process.v2.environment.get_idm8160"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> c<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a class="link" href="../boost/process/v2/environment/set_idm8165.html" title="Function set"><span class="identifier">set</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a><span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8179"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">,</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8187"></a><span class="identifier">set</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                 <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> vw<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8197"></a><span class="identifier">set</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                 <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8205"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> k<span class="special">,</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> vw<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8214"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> k<span class="special">,</span> <a class="link" href="../boost/process/v2/environment/value_view.html" title="Struct value_view">value_view</a> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8221"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8234"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8245"></a><span class="identifier">set</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                   <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8258"></a><span class="identifier">set</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                   <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8269"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> k<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Char<span class="special">,</span> 
                 <span class="keyword">typename</span>  <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special">&lt;</span><span class="special">!</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">is_same</span><span class="special">&lt;</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">char_type</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span><span class="special">&gt;</span> 
          <span class="keyword">void</span> <a name="boost.process.v2.environment.set_idm8281"></a><span class="identifier">set</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> k<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Char</span> <span class="special">*</span> vw<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a class="link" href="../boost/process/v2/environment/unset_idm8291.html" title="Function unset"><span class="identifier">unset</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.unset_idm8302"></a><span class="identifier">unset</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key.html" title="Struct key">key</a> <span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.unset_idm8307"></a><span class="identifier">unset</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">,</span> 
                   <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.unset_idm8314"></a><span class="identifier">unset</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_cstring_ref.html" title="Struct template basic_cstring_ref">basic_cstring_ref</a><span class="special">&lt;</span> <span class="identifier">char_type</span><span class="special">,</span> <span class="identifier">key_char_traits</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <span class="special">&gt;</span> k<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.unset_idm8319"></a><span class="identifier">unset</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> c<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
        <span class="keyword">void</span> <a name="boost.process.v2.environment.unset_idm8325"></a><span class="identifier">unset</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> c<span class="special">)</span><span class="special">;</span>
      <span class="special">}</span>
      <span class="keyword">namespace</span> <span class="identifier">posix</span> <span class="special">{</span>
      <span class="special">}</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span><span class="keyword">namespace</span> <span class="identifier">std</span> <span class="special">{</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8331.html" title="Struct hash&lt;boost::process::v2::environment::key&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8341.html" title="Struct hash&lt;boost::process::v2::environment::key_value_pair&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8351.html" title="Struct hash&lt;boost::process::v2::environment::key_value_pair_view&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair_view</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8361.html" title="Struct hash&lt;boost::process::v2::environment::key_view&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_view</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8371.html" title="Struct hash&lt;boost::process::v2::environment::value&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">value</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../std/hash_boost_process_idm8381.html" title="Struct hash&lt;boost::process::v2::environment::value_view&gt;">hash</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">value_view</span><span class="special">&gt;</span><span class="special">;</span>

  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_element_0u___idm8391.html" title="Class tuple_element&lt;0u, boost::process::v2::environment::key_value_pair&gt;">tuple_element</a><span class="special">&lt;</span><span class="number">0u</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_element_0u___idm8399.html" title="Class tuple_element&lt;0u, boost::process::v2::environment::key_value_pair_view&gt;">tuple_element</a><span class="special">&lt;</span><span class="number">0u</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair_view</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_element_1u___idm8407.html" title="Class tuple_element&lt;1u, boost::process::v2::environment::key_value_pair&gt;">tuple_element</a><span class="special">&lt;</span><span class="number">1u</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_element_1u___idm8415.html" title="Class tuple_element&lt;1u, boost::process::v2::environment::key_value_pair_view&gt;">tuple_element</a><span class="special">&lt;</span><span class="number">1u</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair_view</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_size_boost_p_idm8423.html" title="Class tuple_size&lt;boost::process::v2::environment::key_value_pair&gt;">tuple_size</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="special">&gt;</span> 
    <span class="keyword">class</span> <a class="link" href="../std/tuple_size_boost_p_idm8428.html" title="Class tuple_size&lt;boost::process::v2::environment::key_value_pair_view&gt;">tuple_size</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">process</span><span class="special">::</span><span class="identifier">v2</span><span class="special">::</span><span class="identifier">environment</span><span class="special">::</span><span class="identifier">key_value_pair_view</span><span class="special">&gt;</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> Idx<span class="special">&gt;</span> 
    <span class="keyword">auto</span> <a name="std.get_idm8433"></a><span class="identifier">get</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="../boost/process/v2/environment/key_value_pair.html" title="Struct key_value_pair">boost::process::v2::environment::key_value_pair</a> <span class="special">&amp;</span> kvp<span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> Idx<span class="special">&gt;</span> 
    <span class="keyword">auto</span> <a name="std.get_idm8441"></a><span class="identifier">get</span><span class="special">(</span><a class="link" href="../boost/process/v2/environment/key_value_pair_view.html" title="Struct key_value_pair_view">boost::process::v2::environment::key_value_pair_view</a> kvp<span class="special">)</span><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.error_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/error.hpp" target="_top">boost/process/v2/error.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">namespace</span> <span class="identifier">error</span> <span class="special">{</span>

        <span class="comment">// Errors used for utf8 &lt;-&gt; UCS-2 conversions. </span>
        <span class="keyword">enum</span> <a name="boost.process.v2.error.utf8_conv_error"></a>utf8_conv_error <span class="special">{</span> insufficient_buffer = = 1, invalid_character <span class="special">}</span><span class="special">;</span>

        <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a class="link" href="../boost/process/v2/error/utf8_category.html" title="Global utf8_category">utf8_category</a><span class="special">;</span>
        <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a class="link" href="../boost/process/v2/error/exit_code_category.html" title="Global exit_code_category">exit_code_category</a><span class="special">;</span>        <span class="comment">// An error category that can be used to interpret exit codes of subprocesses. </span>
        <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a name="boost.process.v2.error.get_utf8_category"></a><span class="identifier">get_utf8_category</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
        <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a name="boost.process.v2.error.get_exit_code_category"></a><span class="identifier">get_exit_code_category</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
      <span class="special">}</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.execute_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/execute.hpp" target="_top">boost/process/v2/execute.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor<span class="special">&gt;</span> <span class="keyword">int</span> <a class="link" href="../boost/process/v2/execute_idm8475.html" title="Function template execute"><span class="identifier">execute</span></a><span class="special">(</span><a class="link" href="../boost/process/v2/basic_process.html" title="Struct template basic_process">basic_process</a><span class="special">&lt;</span> <span class="identifier">Executor</span> <span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor<span class="special">&gt;</span> 
        <span class="keyword">int</span> <a name="boost.process.v2.execute_idm8494"></a><span class="identifier">execute</span><span class="special">(</span><a class="link" href="../boost/process/v2/basic_process.html" title="Struct template basic_process">basic_process</a><span class="special">&lt;</span> <span class="identifier">Executor</span> <span class="special">&gt;</span> proc<span class="special">,</span> <span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">any_io_executor</span><span class="special">,</span> 
               <span class="identifier">Token</span> <span class="identifier">WaitHandler</span> DEFAULT_TYPE<span class="special">&gt;</span> 
        <span class="identifier">deduced</span> <a class="link" href="../boost/process/v2/async_execute.html" title="Function template async_execute"><span class="identifier">async_execute</span></a><span class="special">(</span><a class="link" href="../boost/process/v2/basic_process.html" title="Struct template basic_process">basic_process</a><span class="special">&lt;</span> <span class="identifier">Executor</span> <span class="special">&gt;</span><span class="special">,</span> 
                              <span class="identifier">WaitHandler</span> <span class="special">&amp;&amp;</span><span class="identifier">handler</span> <span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.exit_code_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/exit_code.hpp" target="_top">boost/process/v2/exit_code.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a class="link" href="../boost/process/v2/native_exit_code_type.html" title="Type definition native_exit_code_type"><span class="identifier">native_exit_code_type</span></a><span class="special">;</span>
      <span class="identifier">error_code</span> <a class="link" href="../boost/process/v2/check_exit_code.html" title="Function check_exit_code"><span class="identifier">check_exit_code</span></a><span class="special">(</span><span class="identifier">error_code</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">native_exit_code_type</span><span class="special">,</span> 
                                 <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">error</span><span class="special">::</span><span class="identifier">get_exit_code_category</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>

      <span class="comment">// Check if the native exit code indicates the process is still running. </span>
      <span class="keyword">bool</span> <a name="boost.process.v2.process_is_running"></a><span class="identifier">process_is_running</span><span class="special">(</span><span class="identifier">native_exit_code_type</span> code<span class="special">)</span><span class="special">;</span>

      <span class="comment">// Obtain the portable part of the exit code, i.e. what the subprocess has returned from main. </span>
      <span class="keyword">int</span> <a name="boost.process.v2.evaluate_exit_code"></a><span class="identifier">evaluate_exit_code</span><span class="special">(</span><span class="identifier">native_exit_code_type</span> code<span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.pid_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/pid.hpp" target="_top">boost/process/v2/pid.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="boost.process.v2.pid_type"></a><span class="identifier">pid_type</span><span class="special">;</span>

      <span class="comment">// Get the process id of the current process. </span>
      <span class="identifier">pid_type</span> <a name="boost.process.v2.current_pid"></a><span class="identifier">current_pid</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>

      <span class="comment">// List all available pids. </span>
      <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">pid_type</span> <span class="special">&gt;</span> <a name="boost.process.v2.all_pids_idm8572"></a><span class="identifier">all_pids</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>

      <span class="comment">// List all available pids. </span>
      <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">pid_type</span> <span class="special">&gt;</span> <a name="boost.process.v2.all_pids_idm8577"></a><span class="identifier">all_pids</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
      <span class="identifier">pid_type</span> <a name="boost.process.v2.parent_pid_idm8580"></a><span class="identifier">parent_pid</span><span class="special">(</span><span class="identifier">pid_type</span> pid<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
      <span class="identifier">pid_type</span> <a name="boost.process.v2.parent_pid_idm8586"></a><span class="identifier">parent_pid</span><span class="special">(</span><span class="identifier">pid_type</span> pid<span class="special">)</span><span class="special">;</span>
      <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">pid_type</span> <span class="special">&gt;</span> 
      <a name="boost.process.v2.child_pids_idm8590"></a><span class="identifier">child_pids</span><span class="special">(</span><span class="identifier">pid_type</span> pid<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> ec<span class="special">)</span><span class="special">;</span>
      <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">pid_type</span> <span class="special">&gt;</span> <a name="boost.process.v2.child_pids_idm8596"></a><span class="identifier">child_pids</span><span class="special">(</span><span class="identifier">pid_type</span> pid<span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.popen_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/popen.hpp" target="_top">boost/process/v2/popen.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">any_io_executor</span><span class="special">&gt;</span> 
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/basic_popen.html" title="Struct template basic_popen">basic_popen</a><span class="special">;</span>

      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_popen.html" title="Struct template basic_popen">basic_popen</a><span class="special">&lt;</span><span class="special">&gt;</span> <a name="boost.process.v2.popen"></a><span class="identifier">popen</span><span class="special">;</span>  <span class="comment">// A popen object with the default executor. </span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.process_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/process.hpp" target="_top">boost/process/v2/process.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">any_io_executor</span><span class="special">&gt;</span> 
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/basic_process.html" title="Struct template basic_process">basic_process</a><span class="special">;</span>

      <span class="keyword">typedef</span> <a class="link" href="../boost/process/v2/basic_process.html" title="Struct template basic_process">basic_process</a> <a name="boost.process.v2.process"></a><span class="identifier">process</span><span class="special">;</span>  <span class="comment">// Process with the default executor. </span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.process_handle_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/process_handle.hpp" target="_top">boost/process/v2/process_handle.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Executor <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">any_io_executor</span><span class="special">&gt;</span> 
        <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/basic_process_handle.html" title="Struct template basic_process_handle">basic_process_handle</a><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.shell_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/shell.hpp" target="_top">boost/process/v2/shell.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/shell.html" title="Struct shell">shell</a><span class="special">;</span>

      <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a class="link" href="../boost/process/v2/shell_category.html" title="Global shell_category">shell_category</a><span class="special">;</span>

      <span class="comment">// Error category used by the shell parser. </span>
      <span class="keyword">const</span> <span class="identifier">error_category</span> <span class="special">&amp;</span> <a name="boost.process.v2.get_shell_category"></a><span class="identifier">get_shell_category</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.src_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/src.hpp" target="_top">boost/process/v2/src.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis">

<a class="link" href="../BOOST_PROCESS_V2_SOURCE.html" title="Macro BOOST_PROCESS_V2_SOURCE">BOOST_PROCESS_V2_SOURCE</a></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.start_dir_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/start_dir.hpp" target="_top">boost/process/v2/start_dir.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/process_start_dir.html" title="Struct process_start_dir">process_start_dir</a><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="header.boost.process.v2.stdio_hpp"></a>Header &lt;<a href="../../../../../boost/process/v2/stdio.hpp" target="_top">boost/process/v2/stdio.hpp</a>&gt;</h4></div></div></div>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
  <span class="keyword">namespace</span> <span class="identifier">process</span> <span class="special">{</span>
    <span class="keyword">namespace</span> <span class="identifier">v2</span> <span class="special">{</span>
      <span class="keyword">struct</span> <a class="link" href="../boost/process/v2/process_stdio.html" title="Struct process_stdio">process_stdio</a><span class="special">;</span>
    <span class="special">}</span>
  <span class="special">}</span>
<span class="special">}</span></pre>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2006-2012 Julio M. Merino Vidal, Ilya Sokolov,
      Felipe Tanus, Jeff Flinn, Boris Schaeling<br>Copyright © 2016 Klemens D. Morgenstern<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../process.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost/process/v2/bound_launcher.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
